﻿@model CultuRAM.Models.Entity

@{
    ViewBag.Title = "Pedido de Adesão";
}

<h2>Pedido de Adesão 3</h2>

@using (Html.BeginForm("Create", "AccreditingRequest", FormMethod.Post, new { @class = "form-horizontal" }))
{
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Entidade</legend>

        <div class="control-group">
            @Html.LabelFor(model => model.Name, new { @class = "control-label" })
            <div class="controls">
                @Html.TextBoxFor(model => model.Name, new {@class = "input-xxlarge"})
                @Html.ValidationMessageFor(model => model.Name)
            </div>
        </div>
        
        <div class="control-group">
            @Html.LabelFor(model => model.Address, new { @class = "control-label" })
            <div class="controls">
                @Html.TextAreaFor(model => model.Address, new {@class = "input-xxlarge"})
                @Html.ValidationMessageFor(model => model.Address)
            </div>
        </div>

        <div class="input-prepend">
            <div class="control-group">
                @Html.LabelFor(model => model.PostalCode, new { @class = "control-label" })
                <div class="controls">
                    @Html.TextBoxFor(model => model.PostalCode, new { @class = "input-small" })
                    @Html.ValidationMessageFor(model => model.PostalCode)
                </div>
            </div>
        </div>

        <div class="input-append">
            <div class="control-group">
                @Html.LabelFor(model => model.City, new { @class = "control-label" })
                <div class="controls">
                    @Html.DropDownList("CityId", String.Empty)
                    @Html.ValidationMessageFor(model => model.CityId)
                </div>
            </div>
        </div>
        <br />
        <div class="input-prepend">
            <div class="control-group">
                @Html.LabelFor(model => model.Phone, new { @class = "control-label" })
                <div class="controls">
                    @Html.TextBoxFor(model => model.Phone, new { @class = "input-medium" })
                    @Html.ValidationMessageFor(model => model.Phone)
                </div>
            </div>
        </div>
        
        <div class="input-append">
            <div class="control-group">
                @Html.LabelFor(model => model.Fax, new { @class = "control-label" })
                <div class="controls">
                    @Html.TextBoxFor(model => model.Fax, new { @class = "input-medium" })
                    @Html.ValidationMessageFor(model => model.Fax)
                </div>
            </div>
        </div>
        <br/>
        <div class="input-prepend">
            <div class="control-group">
                @Html.LabelFor(model => model.CellPhone, new { @class = "control-label" })
                <div class="controls">
                    @Html.TextBoxFor(model => model.CellPhone, new { @class = "input-medium" })
                    @Html.ValidationMessageFor(model => model.CellPhone)
                </div>
            </div>
        </div>

        <div class="input-append">
            <div class="control-group">
                @Html.LabelFor(model => model.Email, new { @class = "control-label" })
                <div class="controls">
                    @Html.TextBoxFor(model => model.Email, new { @class = "input-medium" })
                    @Html.ValidationMessageFor(model => model.Email)
                </div>
            </div>
        </div>


        <div class="control-group">
            @Html.LabelFor(model => model.Responsible, new { @class = "control-label" })
            <div class="controls">
                @Html.TextBoxFor(model => model.Responsible, new { @class = "input-xxlarge" })
                @Html.ValidationMessageFor(model => model.Responsible)
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.ResponsibleContact, new { @class = "control-label" })
            <div class="controls">
                @Html.TextBoxFor(model => model.ResponsibleContact, new { @class = "input-xxlarge" })
                @Html.ValidationMessageFor(model => model.ResponsibleContact)
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Logo, new { @class = "control-label" })
            <div class="controls">
             @Html.TextBoxFor(model => model.Logo, new { @class = "input-medium"})
              <button value="logo" class="btn btn-default btn-sm">...</button>
              @Html.ValidationMessageFor(model => model.Logo)
            </div>
        </div>
   
        <div class="control-group">
            @Html.LabelFor(model => model.EntityType, new { @class = "control-label" })
            <div class="controls">
                @Html.DropDownList("EntityTypeId", String.Empty)
                @Html.ValidationMessageFor(model => model.EntityTypeId)
            </div>
        </div>

        <div class="control-group">
            <div class="controls">
                <button type="submit" value="Save" class="btn btn-primary">Submeter</button>
            </div>
        </div>

    </fieldset>
}

<div>
    @Html.ActionLink("Voltar para Lista de Entidades", "Index", "Home", null, new {@class="btn btn-default"})
    @*<a href="/Event" class="btn btn-default">Voltar para Lista de Eventos</a>*@
</div>



@Scripts.Render("~/bundles/jqueryval")

 
   
<script>
    $(document).ready(function () {
        alert("validacao!");
        jQuery.validator.unobtrusive.parse('#main');
    });
</script>